#pragma once 


#include "helper/sqlite/QueryResult.h"
#include "helper/sqlite/Value.h"

namespace helper {
namespace sqlite {
namespace stream {

class Row {
public:
  Row(const int index, const size_t columnCount, QueryResult & r)
  : _index(index)
  , _columnCount(columnCount)
  , _result(r) 
  {
  }

  inline const int index() const {
    return _index;
  }
  inline const size_t columnCount() const {
    return _columnCount;
  }
  inline Value value(int col) const{
    return *(_result.values(col));
  }

private:
  const int _index;
  const size_t _columnCount;
  QueryResult & _result;
};

}//namespace stream
}//namespace sqlite
}//namespace helper
